<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Order;

class OrderController extends Controller
{
    public function index() {
    	$orders = Order::with('user')->latest()->paginate();
    	return view('dashboard.order.index', ['datas' => $orders]);
    }

    public function show(Order $order) {
        // dump($order->order_goods()->with('goods')->get());
    	return view('dashboard.order.show', ['order' => $order]);
    }
}
